package com.jake.staticproxy;

public class ProxySubject implements Subject {

    private final Subject subject;

    public ProxySubject(Subject subject) {
        this.subject = subject;
    }

    @Override
    public void method() {
        before();
        subject.method();
        after();
    }

    private void before() {
        System.out.println("static proxy: before method");
    }

    private void after() {
        System.out.println("static proxy: after method");
    }
}
